#include "widget.h"
#include "ui_widget.h"

#include "barutil.h"


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    BarUtil barutil;

    int drawHeight = 80;
    bool drawNumber = true;

    barutil.setBarCode("123456789321", BarCode::EAN13_TYPE, drawHeight);
    ui->label->setPixmap(barutil.paintBar(drawNumber));
}

Widget::~Widget()
{
    delete ui;
}
